package com.childenglish.entity;

import java.time.LocalDateTime;

public class ParentChildRelation {
    private Long id;
    private Long parentId;
    private Long childId;
    private String relationType; // 关系类型，默认'parent'
    private String status; // 状态，默认'0'
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    // 构造方法
    public ParentChildRelation() {
    }

    public ParentChildRelation(Long parentId, Long childId, LocalDateTime createTime) {
        this.parentId = parentId;
        this.childId = childId;
        this.createTime = createTime;
        this.relationType = "parent";
        this.status = "0";
    }

    public ParentChildRelation(Long parentId, Long childId, String relationType, String status, LocalDateTime createTime) {
        this.parentId = parentId;
        this.childId = childId;
        this.relationType = relationType;
        this.status = status;
        this.createTime = createTime;
    }

    // Getter和Setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getChildId() {
        return childId;
    }

    public void setChildId(Long childId) {
        this.childId = childId;
    }

    public String getRelationType() {
        return relationType;
    }

    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "ParentChildRelation{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", childId=" + childId +
                ", relationType='" + relationType + '\'' +
                ", status='" + status + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}